David Flaks Report post Posted 05/04/2005 08:47 PM I am trying to write a VB script to automatically update a Filemaker Pro database with the result variables from a question like "Press 1 to confirm, press 2 to cancel" Has anyone written a script like this and if possible could you help me with the syntax. Share this post Link to post
SupportTeam Report post Posted 05/04/2005 10:27 PM You can just use a DB Query module if you install the database's ODBC drivers... Share this post Link to post
David Flaks Report post Posted 05/05/2005 04:04 PM I have tried to use the Database Query but still with no success. I have installed the ODBC driver correctly in the ODBC Data Sources and have called it "Filemaker" I have tried it in both the System DSN and the User DSN. The Filemaker database that I am using is called "TeleCaller.fp5" and I have set it to be shared and it is open on the computer. My Database query script is as follows:- Database Filemaker Connect String ODBC;DSN=Filemaker;DRIVER={Filemaker Pro} Query UPDATE TeleCaller SET ResultInfo=$RV[RecordId] WHERE RecordId=$RV[RecordId] I am continually getting the following error. (Only the relevant portion of the tracer log is included below) 114839.83 6 After Hangup script:[C:\ApptRem\DBHuman.vgs] 114839.85 0 Script Load C:\ApptRem\DBHuman.vgs 114839.87 6 Loaded VbsAtHangup into:3 114839.90 6 tapi Reply (LineEvReply) ok 66134 0 114839.91 6 timer clear 114839.93 6 [Database Query 8] DB Query 114839.95 6 db ODBC mode used 114840.09 6 rv replace start: [uPDATE TeleCaller SET ResultInfo=$RV[RecordId] WHERE RecordId=$RV[RecordId]] 114840.10 6 rv ns [RecordID]{3}[PatFirstName]{Elona}[Appt_Date]{Saturday, March 5}[Appt_Time]{12:45:00}[Dr_LastName]{Rendon}[PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[OutDial_RetriesLeft]{2}[OutDial_Result]{Contacted_Human}[scriptEnd_Time]{ /5/2005 11:48:20 AM}[scriptEnd_Goto_Script]{C:\ApptRem\Human.vgs}[scriptEnd_Goto_Module]{}[scriptStart_Time]{5/5/2005 11:48:20 AM}[scriptsPath]{C:\ApptRem\}[3_OnHumanAnswer]{1}[Hangup Time]{5/5/2005 11:48:39 AM} 114840.13 6 rv replace end: [uPDATE TeleCaller SET ResultInfo=3 WHERE RecordId=3] 114840.14 6 db About to execute a Modify type operation [uPDATE TeleCaller SET ResultInfo=3 WHERE RecordId=3] 114840.17 6 ERROR 5.2.3063 DB Execute: 3146,ODBC--call failed. 114840.19 6 rv add [Database Query 8_RowCount]{0} 114840.23 6 db DBEngine.Error 3924:37000: [FileMaker][ODBC FileMaker Pro driver]Incompatible datatypes in expression : = :ODBC.Database 114840.24 6 db DBEngine.Error 3146:ODBC--call failed.:DAO.Database 114840.26 6 path {0} not found 114840.28 6 path {} not found 114840.29 6 rv add [Hangup Time]{5/5/2005 11:48:40 AM} 114840.31 6 Hanging up call... [GoNextVgm_Boolean fail] 114840.33 6 HangupCall_Common Mode=AfterHangupRun 114840.34 6 ReinitTelephony due to IDLE 114840.37 6 tapic lineDeallocateCall(MainCall:66117) 0 114840.71 6 lineOpen(6)=> 114840.72 6 Waiting for a call... 114840.74 6 LineHandle=66014 114840.76 6 timer set 3 EV_TIMEOUT_ATERIDLE_ALLOWOUT 114841.09 0 dial start any summary:|6:rdy=0| 114842.86 0 sys cleanup Start 114842.88 0 sys cleanup End 114843.70 6 timer fired EV_TIMEOUT_ATERIDLE_ALLOWOUT 114843.71 6 ScriptEventCode 9013 iLineState=900 114844.13 0 dial start any summary:|6:idx=0| I would really appreciate any help here Share this post Link to post
SupportTeam Report post Posted 05/05/2005 10:57 PM Trace shows that the databases ODBC driver returned to you this error: Incompatible datatypes in expression I'd suggest checking that both ResultInfo and RecordId are numeric fields... Share this post Link to post